#ifndef _OPTIMIZATION_H
#define _OPTIMIZATION_H

#include <cstdlib>
#include <limits>
#include <cassert>
#include <iostream>
#include <exception>
#include <vector>
#include <string>
#include <fstream>
// Boost Library Headers

#include <boost/config.hpp>
#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/graph_utility.hpp>
#include <boost/tuple/tuple.hpp>
#include <boost/utility.hpp>

#include "circuitgraph.h"
#include "parser_helper.h"
#include "extendedlibparser.h"
#include "graphModel.h"
#include "utility.h"
#include "timer_interface.h"

enum CellSpeed { slow, medium, fast } ;
typedef void (*updFunctionPtr) (CircuitGraph&) ; 

class Optimization
{
  public:
        
        Optimization (std::string, std::string, int, updFunctionPtr ) ;

        void updateCellType (CircuitGraph&) ;
        void buildSizerFile (CircuitGraph&, bool) ;
        void buildSizerFile(CircuitGraph& graphIn, bool isFinal, string round_id);
        int  callTimer () ;
        
        int  getPollingTime() const ;
        void setPollingTime(int) ;
		
        updFunctionPtr getUpdaterFunction();
        void setUpdaterFunction(updFunctionPtr) ;
        
        std::vector<std::pair<std::string, std::string> > readSizes (const std::string&);
        
  private:
        std::string    contestDir ;
        std::string    benchmarkName ;
        int	       pollingTime ;
        updFunctionPtr updaterFunction ;
	

} ;

#include "optimization.hpp"

#endif
